/**
 * 清空结果显示DIV内容
 * */
function reset() {
    //TODO:清空结果显示DIV内容
}
/**
 * 显示Toast消息,
 * @param msg Toast显示内容
 * @duration Toast显示时间[可行，默认显示4s]
 */
function toast(msg, duration) {
    var _toast = $("#os-toast");
    if (0 == _toast.length) {
        _toast = $("<div id=\"os-toast\" class=\"toast\"><div class=\"toast-msg\">"+(msg?msg:"")+"</div></div>");
        $("body").append(_toast);
    }
    if (_toast.is(":hidden")) {
        $(".toast-msg").text(msg?msg:"");
        _toast.show();
        setTimeout(function () {
            _toast.hide();
        }, duration ? duration : 2000);
    }
}
/**
 * 页面加载遮罩层
 * @param msg
 */
function loading(msg) {
    var _loading = $("#os-loading");
    if (0 == _loading.length) {
        _loading = $("<div id=\"os-loading\" class=\"pg-load\"><div class=\"load-msg\">"+(msg?msg:"正在加载")+"...</div></div>");
        $("body").append(_loading);
    }
    if (_loading.is(":hidden")) {
        $(".load-msg").text(msg);
        $("#os-loading").fadeIn(100);
    }
}
/**
 * 结束加载，关闭遮罩层
 */
function finish(msg) {
    $("#os-loading").fadeOut(100);
    if (msg)
        toast(msg);
    //else
    //toast("查询失败");
}